package com.ruoyi.task.service.impl;

import java.util.Collections;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.task.domain.TaskExamine;
import com.ruoyi.task.mapper.TaskExamineMapper;
import com.ruoyi.task.service.ITaskExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 任务审核详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-17
 */
@Service
public class TaskExamineServiceImpl implements ITaskExamineService
{
    @Autowired
    private TaskExamineMapper taskExamineMapper;

    /**
     * 查询任务审核详情
     * 
     * @param id 任务审核详情主键
     * @return 任务审核详情
     */
    @Override
    public TaskExamine selectTaskExamineById(Long id)
    {
        return taskExamineMapper.selectTaskExamineById(id);
    }

    /**
     * 查询任务审核详情列表
     * 
     * @param taskExamine 任务审核详情
     * @return 任务审核详情
     */
    @Override
    public List<TaskExamine> selectTaskExamineList(TaskExamine taskExamine)
    {
        return taskExamineMapper.selectTaskExamineList(taskExamine);
    }

    /**
     * 新增任务审核详情
     * 
     * @param taskExamine 任务审核详情
     * @return 结果
     */
    @Override
    public int insertTaskExamine(TaskExamine taskExamine)
    {
        taskExamine.setCreateTime(DateUtils.getNowDate());
        return taskExamineMapper.insertTaskExamine(taskExamine);
    }

    /**
     * 修改任务审核详情
     * 
     * @param taskExamine 任务审核详情
     * @return 结果
     */
    @Override
    public int updateTaskExamine(TaskExamine taskExamine)
    {
        return taskExamineMapper.updateTaskExamine(taskExamine);
    }

    /**
     * 批量删除任务审核详情
     * 
     * @param ids 需要删除的任务审核详情主键
     * @return 结果
     */
    @Override
    public int deleteTaskExamineByIds(Long[] ids)
    {
        return taskExamineMapper.deleteTaskExamineByIds(ids);
    }

    /**
     * 删除任务审核详情信息
     * 
     * @param id 任务审核详情主键
     * @return 结果
     */
    @Override
    public int deleteTaskExamineById(Long id)
    {
        return taskExamineMapper.deleteTaskExamineById(id);
    }

    @Override
    public List<TaskExamine> getTaskExamine(Long userId) {
        return taskExamineMapper.getTaskExamine(userId);
    }
}
